package com.gopay.common.constants.cloud;

/**
 * Created by Johnson on 2017/1/10.
 */
public enum CloudCustStat {

    /**
     * 待审核
     */
    AUDIT_READY("0"),

    /**
     * 审核通过
     */
    AUDIT_PASS("1"),

    /**
     * 审核拒绝
     */
    AUDIT_REJECT("2"),

    /**
     * 身份证有效期快过期
     */
    CERT_TERM_QUICKLY_EXPIRE("3"),

    /**
     * 身份证有效期过期
     */
    CERT_TERM_EXPIRE("4")
    ;

    public final String value;

    CloudCustStat(String value) {
        this.value = value;
    }

    public CloudCustStat get(String value) {
        CloudCustStat[] custStats = CloudCustStat.class.getEnumConstants();
        for (CloudCustStat custStat : custStats) {
            if (custStat.value.equals(value)) {
                return custStat;
            }
        }
        throw new RuntimeException("wrong " + CloudCustStat.class.getSimpleName() + " string value!" + value);
    }

}
